DevForce Help Reference
Union<TSource>(IEntityQuery<TSource>,IEnumerable<TSource>) Method
Example 


Produces the set union of two sequences.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function Union(Of TSource)( _
   ByVal source1 As IEntityQuery(Of TSource), _
   ByVal source2 As IEnumerable(Of TSource) _
) As IEntityQuery(Of TSource)
'Usage
 
Dim source1 As IEntityQuery(Of TSource)
Dim source2 As IEnumerable(Of TSource)
Dim value As IEntityQuery(Of TSource)
 
value = EntityQueryExtensions.Union(Of TSource)(source1, source2)

Parameters

source1
source2

Type Parameters

TSource
Example
var mgr1 = new DomainModelEntityManager();

var query1 = mgr1.Customers.Where(c => c.Country == "UK");
var query2 = mgr1.Customers.Where(c => c.Region == "CA");

var combinedQuery = query1.Union(query2);
var list = combinedQuery.Execute();
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityQueryExtensions Class
EntityQueryExtensions Members
Overload List

Send Feedback